package com.itheima.thread5;

public class Demo01 {

    public static void main(String[] args) throws InterruptedException {

        Thread t1 = new Thread(() -> {
            for (int i = 0; i < 3000; i++) {
                System.out.println(Thread.currentThread().getName()+i);
            }
        });
       //t1.setDaemon(true);
        t1.setName("姐也不是女神");
        t1.start();

        Thread t2 = new Thread(() -> {
            for (int i = 0; i < 10000000; i++) {
                System.out.println(Thread.currentThread().getName()+i);
            }
        });
        t2.setName("我是备胎");
       // t2.setDaemon(true);
        t2.start();

        for (int i = 0; i < 20; i++) {
            Thread.sleep(1);
            System.out.println("来过了");
        }




    }
}
